package view;

import java.awt.event.ActionListener;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author fp0520111064
 */
public class FrmMenu extends javax.swing.JFrame {

    /**
     * Creates new form tela
     */
    public FrmMenu() {
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jMenu1 = new javax.swing.JMenu();
        jMenuItem1 = new javax.swing.JMenuItem();
        jMenuItem10 = new javax.swing.JMenuItem();
        jMenuItem11 = new javax.swing.JMenuItem();
        pnlInicial = new javax.swing.JPanel();
        lblLogo = new javax.swing.JLabel();
        pnlBotoes = new javax.swing.JPanel();
        btnCadastrarCliente = new javax.swing.JButton();
        btnCadastrarProduto = new javax.swing.JButton();
        btnNovaReserma = new javax.swing.JButton();
        btnConsultarCliente = new javax.swing.JButton();
        btnConsultarProduto = new javax.swing.JButton();
        btnConsultarReservas = new javax.swing.JButton();
        btnNovaVenda = new javax.swing.JButton();
        pnlBarInicial = new javax.swing.JPanel();
        ftfDataBar = new javax.swing.JFormattedTextField();
        lblSeparadorBar = new javax.swing.JLabel();
        ftfHorario = new javax.swing.JFormattedTextField();
        mnbInicial = new javax.swing.JMenuBar();
        mnCadastros = new javax.swing.JMenu();
        miCadastrarClientes = new javax.swing.JMenuItem();
        miCadastrarProdutos = new javax.swing.JMenuItem();
        miCadastrarReservaMesa = new javax.swing.JMenuItem();
        mnConsultas = new javax.swing.JMenu();
        miConsultarProdutos = new javax.swing.JMenuItem();
        miConsultarClientes = new javax.swing.JMenuItem();
        miConsultarReservas = new javax.swing.JMenuItem();
        mnFerramentas = new javax.swing.JMenu();
        miCalc = new javax.swing.JMenuItem();
        jsprFerramentas = new javax.swing.JPopupMenu.Separator();
        miBackup = new javax.swing.JMenuItem();
        mnAjuda = new javax.swing.JMenu();
        miSobre = new javax.swing.JMenuItem();
        miManual = new javax.swing.JMenuItem();
        miAjudaOn = new javax.swing.JMenuItem();

        jMenu1.setText("jMenu1");

        jMenuItem1.setText("jMenuItem1");

        jMenuItem10.setText("jMenuItem10");

        jMenuItem11.setText("jMenuItem11");

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Pastelaria Matryuska");
        setAlwaysOnTop(true);
        setBackground(new java.awt.Color(255, 255, 153));
        setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        setIconImages(null);
        setUndecorated(true);

        pnlInicial.setBackground(new java.awt.Color(255, 255, 153));
        pnlInicial.setForeground(new java.awt.Color(255, 255, 102));
        pnlInicial.setToolTipText("Menu Inicial");

        lblLogo.setBackground(new java.awt.Color(255, 255, 153));
        lblLogo.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblLogo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/img/LOGO_PASTELARIA_MATRYUSKA.png"))); // NOI18N
        lblLogo.setLabelFor(pnlInicial);
        lblLogo.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        lblLogo.setFocusable(false);
        lblLogo.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        lblLogo.setMaximumSize(new java.awt.Dimension(512, 384));
        lblLogo.setMinimumSize(new java.awt.Dimension(512, 384));
        lblLogo.setPreferredSize(new java.awt.Dimension(1024, 768));

        pnlBotoes.setBackground(new java.awt.Color(255, 255, 204));

        btnCadastrarCliente.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        btnCadastrarCliente.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/img/Add-Male-User-icon.png"))); // NOI18N
        btnCadastrarCliente.setText("Cadastrar Cliente");
        btnCadastrarCliente.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnCadastrarCliente.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        pnlBotoes.add(btnCadastrarCliente);

        btnCadastrarProduto.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        btnCadastrarProduto.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/img/Package-Add-icon.png"))); // NOI18N
        btnCadastrarProduto.setText("Cadastrar Produto");
        btnCadastrarProduto.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnCadastrarProduto.setMaximumSize(new java.awt.Dimension(117, 23));
        btnCadastrarProduto.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        pnlBotoes.add(btnCadastrarProduto);

        btnNovaReserma.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        btnNovaReserma.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/img/event-icon (1).png"))); // NOI18N
        btnNovaReserma.setText("Nova Reserva");
        btnNovaReserma.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnNovaReserma.setMaximumSize(new java.awt.Dimension(117, 23));
        btnNovaReserma.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        pnlBotoes.add(btnNovaReserma);

        btnConsultarCliente.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        btnConsultarCliente.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/img/Search-Male-User-icon.png"))); // NOI18N
        btnConsultarCliente.setText("Consultar Cliente");
        btnConsultarCliente.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnConsultarCliente.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        pnlBotoes.add(btnConsultarCliente);

        btnConsultarProduto.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        btnConsultarProduto.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/img/product-icon-search.png"))); // NOI18N
        btnConsultarProduto.setText("Consultar Produto");
        btnConsultarProduto.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnConsultarProduto.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        pnlBotoes.add(btnConsultarProduto);

        btnConsultarReservas.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        btnConsultarReservas.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/img/event-search-icon.png"))); // NOI18N
        btnConsultarReservas.setText("Consultar Reservas");
        btnConsultarReservas.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnConsultarReservas.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        pnlBotoes.add(btnConsultarReservas);

        btnNovaVenda.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        btnNovaVenda.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/img/budget-icon.png"))); // NOI18N
        btnNovaVenda.setText("Nova Venda");
        btnNovaVenda.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnNovaVenda.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        pnlBotoes.add(btnNovaVenda);

        pnlBarInicial.setBackground(new java.awt.Color(255, 255, 255));

        ftfDataBar.setBackground(new java.awt.Color(204, 204, 204));
        ftfDataBar.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.DateFormatter(new java.text.SimpleDateFormat("d/M/yy"))));
        ftfDataBar.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        ftfDataBar.setText("16/03/2012");

        lblSeparadorBar.setText("|");

        ftfHorario.setBackground(new java.awt.Color(204, 204, 204));
        ftfHorario.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.DateFormatter(new java.text.SimpleDateFormat("h:mm"))));
        ftfHorario.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        ftfHorario.setText("00:00");

        javax.swing.GroupLayout pnlBarInicialLayout = new javax.swing.GroupLayout(pnlBarInicial);
        pnlBarInicial.setLayout(pnlBarInicialLayout);
        pnlBarInicialLayout.setHorizontalGroup(
            pnlBarInicialLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlBarInicialLayout.createSequentialGroup()
                .addComponent(ftfDataBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(10, 10, 10)
                .addComponent(lblSeparadorBar, javax.swing.GroupLayout.PREFERRED_SIZE, 4, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(ftfHorario, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 1037, Short.MAX_VALUE))
        );
        pnlBarInicialLayout.setVerticalGroup(
            pnlBarInicialLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlBarInicialLayout.createSequentialGroup()
                .addGap(0, 0, Short.MAX_VALUE)
                .addGroup(pnlBarInicialLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(ftfDataBar)
                    .addComponent(ftfHorario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblSeparadorBar, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)))
        );

        javax.swing.GroupLayout pnlInicialLayout = new javax.swing.GroupLayout(pnlInicial);
        pnlInicial.setLayout(pnlInicialLayout);
        pnlInicialLayout.setHorizontalGroup(
            pnlInicialLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(pnlBotoes, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(pnlBarInicial, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlInicialLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lblLogo, javax.swing.GroupLayout.DEFAULT_SIZE, 1147, Short.MAX_VALUE)
                .addContainerGap())
        );
        pnlInicialLayout.setVerticalGroup(
            pnlInicialLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlInicialLayout.createSequentialGroup()
                .addComponent(pnlBotoes, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(97, 97, 97)
                .addComponent(lblLogo, javax.swing.GroupLayout.DEFAULT_SIZE, 384, Short.MAX_VALUE)
                .addGap(188, 188, 188)
                .addComponent(pnlBarInicial, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        mnbInicial.setBackground(new java.awt.Color(255, 255, 227));
        mnbInicial.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

        mnCadastros.setText("Cadastros");

        miCadastrarClientes.setText("Clientes");
        mnCadastros.add(miCadastrarClientes);

        miCadastrarProdutos.setText("Produtos");
        miCadastrarProdutos.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                miCadastrarProdutosActionPerformed(evt);
            }
        });
        mnCadastros.add(miCadastrarProdutos);

        miCadastrarReservaMesa.setText("Reserva de Mesa");
        mnCadastros.add(miCadastrarReservaMesa);

        mnbInicial.add(mnCadastros);

        mnConsultas.setText("Consultas");

        miConsultarProdutos.setText("Produto");
        mnConsultas.add(miConsultarProdutos);

        miConsultarClientes.setText("Cliente");
        mnConsultas.add(miConsultarClientes);

        miConsultarReservas.setText("Reserva");
        mnConsultas.add(miConsultarReservas);

        mnbInicial.add(mnConsultas);

        mnFerramentas.setText("Ferramentas");

        miCalc.setText("Calculadora");
        mnFerramentas.add(miCalc);
        mnFerramentas.add(jsprFerramentas);

        miBackup.setText("Backup");
        mnFerramentas.add(miBackup);

        mnbInicial.add(mnFerramentas);

        mnAjuda.setText("Ajuda");

        miSobre.setText("Sobre");
        mnAjuda.add(miSobre);

        miManual.setText("Manual");
        mnAjuda.add(miManual);

        miAjudaOn.setText("Ajuda Online");
        mnAjuda.add(miAjudaOn);

        mnbInicial.add(mnAjuda);

        setJMenuBar(mnbInicial);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(pnlInicial, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(pnlInicial, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        pnlInicial.getAccessibleContext().setAccessibleName("Menu Inicial");

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void miCadastrarProdutosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_miCadastrarProdutosActionPerformed
    }//GEN-LAST:event_miCadastrarProdutosActionPerformed

    public void setActionListener(ActionListener al) {
        miAjudaOn.addActionListener(al);
        miAjudaOn.setActionCommand("Exibir_Ajuda");
        miBackup.addActionListener(al);
        miBackup.setActionCommand("Exibir_Backup");
        miCalc.addActionListener(al);
        miCalc.setActionCommand("Exibir_Calculadora");
        miCadastrarClientes.addActionListener(al);
        miCadastrarClientes.setActionCommand("Exibir_CadastroCliente");
        miCadastrarProdutos.addActionListener(al);
        miCadastrarProdutos.setActionCommand("Exibir_CadastroProduto");
        miCadastrarReservaMesa.addActionListener(al);
        miCadastrarReservaMesa.setActionCommand("Exibir_CadastroReserva");
        miConsultarClientes.addActionListener(al);
        miConsultarClientes.setActionCommand("Exibir_ConsultaCliente");
        miConsultarProdutos.addActionListener(al);
        miConsultarProdutos.setActionCommand("Exibir_ConsultaProduto");
        miConsultarReservas.addActionListener(al);
        miConsultarReservas.setActionCommand("Exibir_ConsultaReserva");
        miManual.addActionListener(al);
        miManual.setActionCommand("Exibir_Manual");
        miSobre.addActionListener(al);
        miSobre.setActionCommand("Exibir_Sobre");
        
        btnCadastrarCliente.addActionListener(al);
        btnCadastrarCliente.setActionCommand("Exibir_CadastroCliente");
        btnCadastrarProduto.addActionListener(al);
        btnCadastrarProduto.setActionCommand("Exibir_CadastroProduto");
        btnConsultarCliente.addActionListener(al);
        btnConsultarCliente.setActionCommand("Exibir_ConsultaCliente");
        btnConsultarProduto.addActionListener(al);
        btnConsultarProduto.setActionCommand("Exibir_ConsultaProduto");
        btnConsultarReservas.addActionListener(al);
        btnConsultarReservas.setActionCommand("Exibir_ConsultaReserva");
        btnNovaReserma.addActionListener(al);
        btnNovaReserma.setActionCommand("Exibir_NovaReserva");
        btnNovaVenda.addActionListener(al);
        btnNovaVenda.setActionCommand("Exibir_NovaVenda");
    }
    
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /*
         * Set the Nimbus look and feel
         */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /*
         * If Nimbus (introduced in Java SE 6) is not available, stay with the
         * default look and feel. For details see
         * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(FrmMenu.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(FrmMenu.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(FrmMenu.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(FrmMenu.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /*
         * Create and display the form
         */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new FrmMenu().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnCadastrarCliente;
    private javax.swing.JButton btnCadastrarProduto;
    private javax.swing.JButton btnConsultarCliente;
    private javax.swing.JButton btnConsultarProduto;
    private javax.swing.JButton btnConsultarReservas;
    private javax.swing.JButton btnNovaReserma;
    private javax.swing.JButton btnNovaVenda;
    private javax.swing.JFormattedTextField ftfDataBar;
    private javax.swing.JFormattedTextField ftfHorario;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JMenuItem jMenuItem10;
    private javax.swing.JMenuItem jMenuItem11;
    private javax.swing.JPopupMenu.Separator jsprFerramentas;
    private javax.swing.JLabel lblLogo;
    private javax.swing.JLabel lblSeparadorBar;
    private javax.swing.JMenuItem miAjudaOn;
    private javax.swing.JMenuItem miBackup;
    private javax.swing.JMenuItem miCadastrarClientes;
    private javax.swing.JMenuItem miCadastrarProdutos;
    private javax.swing.JMenuItem miCadastrarReservaMesa;
    private javax.swing.JMenuItem miCalc;
    private javax.swing.JMenuItem miConsultarClientes;
    private javax.swing.JMenuItem miConsultarProdutos;
    private javax.swing.JMenuItem miConsultarReservas;
    private javax.swing.JMenuItem miManual;
    private javax.swing.JMenuItem miSobre;
    private javax.swing.JMenu mnAjuda;
    private javax.swing.JMenu mnCadastros;
    private javax.swing.JMenu mnConsultas;
    private javax.swing.JMenu mnFerramentas;
    private javax.swing.JMenuBar mnbInicial;
    private javax.swing.JPanel pnlBarInicial;
    private javax.swing.JPanel pnlBotoes;
    private javax.swing.JPanel pnlInicial;
    // End of variables declaration//GEN-END:variables
}
